package cn.zifangsky.jvm.part2.threadlocal.demo2;

/**
 * 测试通过{@link ThreadLocal}在线程生命周期中随意访问数据
 * @author zifangsky
 * @date 2020/7/11
 * @since 1.0.0
 */
public class Demo {

    public static void main(String[] args) {
        Prepare prepare = new Prepare();

        //1. 数据初始化
        prepare.init(1, "张三");
        prepare.init(2, "李四");
        prepare.init(3, "王五");

        //2. 模拟业务逻辑处理
        Handle handle = new Handle();
        handle.handle();
    }

}
